package net.jonbuck.tassoo.ui.util;

import org.eclipse.jface.databinding.swt.WidgetValueProperty;
import org.eclipse.nebula.timetext.TimeText;
import org.eclipse.swt.SWT;

/**
 * 
 * 
 * @since 1.0.0
 */
public class TimeTextWidgetValueProperty extends WidgetValueProperty {

	/**
	 * 
	 */
	public TimeTextWidgetValueProperty() {
		super(SWT.Modify);
	}

	/**
	 * 
	 */
	public Object getValueType() {
		return String.class;
	}

	/**
	 * 
	 */
	protected Object doGetValue(Object source) {
		TimeText timeText = (TimeText) source;
		return timeText.getText();
	}

	/**
	 * 
	 */
	protected void doSetValue(Object source, Object value) {
		TimeText timeText = (TimeText) source;
		timeText.setText((String) value);
	}

}
